(** Bombs-Must-Detonate: BMDLang Type Checker Signature
    @author Brian Go *)

(** Used to type any element of the AST *)
type bmdtype = 
    TyInt
  | TyFloat
  | TyString
  | TyBool
  | TyVoid
  | TyList of bmdtype
  | TyEnumType of string
  | TyEnum of string
  | TyStruct of string
  | TyArray of bmdtype
  | TyArrow of bmdtype list * bmdtype
  | TyRef of bmdtype
  | TyTemplate of string

(** Used to keep track of the typing environment during typechecking *)
type typeenvdef =
    TyEnumDef of string * string list
  | TyStructDef of string * (string * bmdtype) list * Ast.data_type list
  | TyFunDef of string * bmdtype
  | TyVarDef of string * bmdtype
  | TyTemplateDef of string list
  | TyIncludeDef of string

(** Determines whether an AST is validly typed.  Prints typing exceptions. *)
val is_typed: Ast.src_program -> bool

(** Gives a string representation of a given type. *)
val string_of_type: bmdtype -> string

(** Resets the buffer which stores the linker header information generated by the typechecker. *)
val reset_link_buffer: unit -> unit

(** Gets the linker header information. *)
val get_link_buffer: unit -> string

